package com.yidu.entity;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 类的描述：实体类njllllllllllllllllll
 * spring容器来帮你实例化bean 就要在类上面添加组件的注解
 * @Component 组件注解
 * 分门别类地来写组件注解 ，例如 Controller @Cotroller
 * 分门别类地来写组件注解 ，例如 Service @Service
 *
 *
 * @author sunny
 * @version 1.0
 * @since 2022/05/30
 */
@Component
@ConfigurationProperties(prefix = "person")
public class Person {

    private String name;
    private String age;
    private String sex;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age='" + age + '\'' +
                ", sex='" + sex + '\'' +
                '}';
    }
}
